<?
	$nDestino = getParam('nDestino','PG', 1);
	// Destino Excel 
	if ( $nDestino == 2 )  {		
		ob_end_clean ();
		header("Content-Type: application/vnd.ms-excel");
		header("Content-Disposition: attachment; filename=listado.xls");
		header("Pragma: no-cache");
		header("Expires: 0");
		echo $this->oDatabase->getHeaders("", "\t");
		echo $this->oDatabase->getQuery("", "\t", "\n");
	
		//header("Content-Disposition: attachment; filename=salida.csv");
		//header("Pragma: no-cache");
		//header("Expires: 0");
		//echo $this->oDatabase->getHeaders('"', ";");
		//echo $this->oDatabase->getQuery('"', ";", "\n");
    	
		ob_end_flush ();
		exit();
	}
	
	// Destino Soporte
	if ( $nDestino == 3 )  {		
		echo $this->oDatabase->cSql;
		ob_end_flush ();
		exit();
	}

?>
